package com.yanqu.road.server.cmd.vehicle;

import com.yanqu.road.pb.vehicle.VehicleProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.vehicle.VehicleModule;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.GameProtocol;

/**
 * @author ：zfr
 * @date ：2021/9/28 18:38
 */
@Cmd(code = GameProtocol.S_STOP_VEHICLE_SKILL_MODIFY_AUTO, desc = "停止珍兽技能自动改装")
public class StopVehicleSkillModifyAutoCmd extends AbstractCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        VehicleProto.StopVehicleSkillModifyAutoRespMsg.Builder respMsg = VehicleProto.StopVehicleSkillModifyAutoRespMsg.newBuilder();
        player.getModule(VehicleModule.class).stopVehicleSkillModifyAuto(respMsg);
        player.sendPacket(ClientProtocol.U_STOP_VEHICLE_SKILL_MODIFY_AUTO, respMsg);
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
